From acf1c8fd495c196722d5d1fe146269a2b25a7e23 Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 12 Feb 2010 15:24:39 +0000 Subject: [PATCH] VPL improvements. Decode HDOP and VDOP. --- garmin.c | 7 + reference/track/vpl_reference.gpx | 1000 +++++++++++++++++++++++++++++ vpl.c | 73 ++- xmldoc/formats/vpl.xml | 11 +- 4 files changed, 1076 insertions(+), 15 deletions(-) diff --git a/garmin.c b/garmin.c index 5e1288c3f..c1c05a4e5 100644 --- a/garmin.c +++ b/garmin.c @@ -222,6 +222,13 @@ rw_init(const char *fname) break; } + + // If a user has specified a non-default character set, we'll trust + // them to sort our the wreckage of violating the Garmin protocol and + // ship characters to the device in that character set. + if (global_opts.charset != &cet_cs_vec_utf8) { + receiver_charset = global_opts.charset_name; + } if (global_opts.debug_level > 0) { fprintf(stderr, "Waypoint type: %d\n" "Chosen waypoint length %d\n", diff --git a/reference/track/vpl_reference.gpx b/reference/track/vpl_reference.gpx index 5fd47f192..a4a5d2a9a 100644 --- a/reference/track/vpl_reference.gpx +++ b/reference/track/vpl_reference.gpx @@ -14,3000 +14,4000 @@ 29.253180 11 + 0.875000 + 1.500000 225.000000 29.253180 11 + 0.875000 + 1.500000 226.000000 29.225241 11 + 0.875000 + 1.500000 226.000000 29.225241 11 + 0.875000 + 1.500000 226.000000 29.197300 11 + 0.875000 + 1.500000 226.000000 29.225241 11 + 0.875000 + 1.500000 226.000000 29.225241 11 + 0.875000 + 1.500000 226.000000 29.253180 11 + 0.875000 + 1.500000 226.000000 29.253180 11 + 0.875000 + 1.500000 227.000000 29.253180 11 + 0.875000 + 1.500000 227.000000 29.281120 11 + 0.875000 + 1.500000 227.000000 29.281120 11 + 0.875000 + 1.500000 227.000000 29.281120 11 + 0.875000 + 1.500000 227.000000 29.253180 11 + 0.875000 + 1.500000 227.000000 29.225241 11 + 0.875000 + 1.500000 227.000000 29.281120 11 + 0.875000 + 1.500000 227.000000 29.364941 11 + 0.875000 + 1.500000 227.000000 29.392879 11 + 0.875000 + 1.500000 227.000000 29.364941 11 + 0.875000 + 1.500000 227.000000 29.364941 11 + 0.875000 + 1.500000 227.000000 29.364941 11 + 0.875000 + 1.500000 227.000000 29.392879 11 + 0.875000 + 1.500000 227.000000 29.392879 11 + 0.875000 + 1.500000 227.000000 29.392879 11 + 0.875000 + 1.500000 227.000000 29.392879 10 + 1.000000 + 1.750000 227.000000 29.364941 11 + 0.875000 + 1.500000 227.000000 29.309059 11 + 0.875000 + 1.500000 227.000000 29.281120 11 + 0.875000 + 1.500000 226.000000 29.281120 11 + 0.875000 + 1.500000 226.000000 29.225241 11 + 0.875000 + 1.500000 226.000000 29.197300 11 + 0.875000 + 1.500000 226.000000 29.169359 11 + 0.875000 + 1.500000 225.000000 29.141420 11 + 0.875000 + 1.500000 225.000000 29.141420 11 + 0.875000 + 1.500000 225.000000 29.141420 11 + 0.875000 + 1.500000 224.000000 29.141420 11 + 0.875000 + 1.500000 224.000000 29.113480 11 + 0.875000 + 1.500000 224.000000 29.141420 10 + 1.000000 + 1.750000 224.000000 29.169359 10 + 1.000000 + 1.750000 223.000000 29.225241 10 + 1.000000 + 1.750000 223.000000 29.253180 10 + 1.000000 + 1.750000 223.000000 29.281120 11 + 0.875000 + 1.500000 223.000000 29.253180 11 + 0.875000 + 1.500000 223.000000 29.253180 11 + 0.875000 + 1.500000 223.000000 29.225241 10 + 1.000000 + 1.500000 223.000000 29.197300 10 + 1.000000 + 1.500000 223.000000 29.225241 10 + 1.000000 + 1.500000 223.000000 29.253180 9 + 1.125000 + 1.500000 223.000000 29.281120 9 + 1.125000 + 1.500000 223.000000 29.281120 9 + 1.125000 + 1.500000 223.000000 29.309059 9 + 1.125000 + 1.500000 223.000000 29.281120 9 + 1.125000 + 1.500000 223.000000 29.281120 9 + 1.125000 + 1.500000 223.000000 29.253180 9 + 1.125000 + 1.500000 222.000000 29.253180 9 + 1.125000 + 1.500000 222.000000 29.253180 9 + 1.125000 + 1.500000 222.000000 29.225241 9 + 1.125000 + 1.500000 222.000000 29.225241 9 + 1.125000 + 1.500000 222.000000 29.225241 9 + 1.125000 + 1.500000 222.000000 29.225241 10 + 1.000000 + 1.500000 222.000000 29.253180 10 + 1.000000 + 1.500000 222.000000 29.253180 10 + 1.000000 + 1.500000 222.000000 29.253180 10 + 1.000000 + 1.500000 222.000000 29.253180 10 + 1.000000 + 1.500000 222.000000 29.253180 10 + 1.000000 + 1.500000 222.000000 29.253180 10 + 1.000000 + 1.500000 222.000000 29.253180 10 + 1.000000 + 1.500000 221.000000 29.225241 10 + 1.000000 + 1.500000 221.000000 29.253180 10 + 1.000000 + 1.500000 221.000000 29.225241 10 + 1.000000 + 1.500000 221.000000 29.197300 10 + 1.000000 + 1.500000 221.000000 29.197300 10 + 1.000000 + 1.500000 221.000000 29.197300 10 + 1.000000 + 1.500000 221.000000 29.197300 10 + 1.000000 + 1.500000 221.000000 29.197300 10 + 1.000000 + 1.500000 221.000000 29.225241 10 + 1.000000 + 1.500000 220.000000 29.225241 10 + 1.000000 + 1.500000 220.000000 29.225241 10 + 1.000000 + 1.500000 220.000000 29.253180 10 + 1.000000 + 1.500000 220.000000 29.225241 10 + 1.000000 + 1.500000 220.000000 29.281120 10 + 1.000000 + 1.500000 220.000000 29.253180 10 + 1.000000 + 1.500000 220.000000 29.253180 10 + 1.000000 + 1.500000 220.000000 29.225241 10 + 1.000000 + 1.500000 220.000000 29.225241 10 + 1.000000 + 1.500000 220.000000 29.253180 10 + 1.000000 + 1.500000 219.000000 29.225241 10 + 1.000000 + 1.500000 219.000000 29.225241 10 + 1.000000 + 1.500000 219.000000 29.225241 10 + 1.000000 + 1.500000 219.000000 29.225241 10 + 1.000000 + 1.500000 219.000000 29.225241 9 + 1.000000 + 1.750000 219.000000 29.225241 10 + 1.000000 + 1.500000 219.000000 29.225241 10 + 1.000000 + 1.500000 219.000000 29.197300 10 + 1.125000 + 1.500000 219.000000 29.225241 10 + 1.000000 + 1.500000 218.000000 29.225241 9 + 1.125000 + 1.500000 218.000000 29.253180 9 + 1.125000 + 1.500000 218.000000 29.253180 10 + 1.000000 + 1.500000 218.000000 29.281120 11 + 0.875000 + 1.500000 218.000000 29.281120 10 + 1.000000 + 1.750000 218.000000 29.281120 10 + 1.000000 + 1.750000 217.000000 29.281120 10 + 1.000000 + 1.750000 217.000000 29.281120 9 + 1.000000 + 1.750000 217.000000 29.281120 9 + 1.000000 + 1.750000 217.000000 29.253180 9 + 1.000000 + 1.750000 217.000000 29.197300 10 + 1.000000 + 1.750000 217.000000 29.141420 9 + 1.125000 + 2.125000 217.000000 29.225241 8 + 1.000000 + 2.000000 217.000000 29.281120 6 + 1.750000 + 1.875000 216.000000 29.225241 8 + 1.250000 + 2.125000 217.000000 29.253180 9 + 1.000000 + 1.750000 217.000000 29.253180 10 + 1.000000 + 1.500000 217.000000 29.253180 11 + 0.875000 + 1.500000 217.000000 29.253180 11 + 0.875000 + 1.500000 217.000000 29.225241 11 + 0.875000 + 1.500000 217.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.253180 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.197300 11 + 0.875000 + 1.500000 218.000000 29.253180 11 + 0.875000 + 1.500000 218.000000 29.253180 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.253180 11 + 0.875000 + 1.500000 218.000000 29.253180 11 + 0.875000 + 1.500000 218.000000 29.253180 11 + 0.875000 + 1.500000 218.000000 29.253180 11 + 0.875000 + 1.500000 218.000000 29.253180 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 218.000000 29.225241 11 + 0.875000 + 1.500000 217.000000 29.225241 11 + 0.875000 + 1.500000 217.000000 29.225241 11 + 0.875000 + 1.500000 217.000000 29.225241 11 + 0.875000 + 1.500000 217.000000 29.253180 11 + 0.875000 + 1.500000 217.000000 29.281120 11 + 0.875000 + 1.500000 217.000000 29.281120 11 + 0.875000 + 1.500000 217.000000 29.281120 11 + 0.875000 + 1.500000 217.000000 29.281120 11 + 0.875000 + 1.500000 217.000000 29.253180 11 + 0.875000 + 1.500000 217.000000 29.253180 11 + 0.875000 + 1.500000 217.000000 29.225241 11 + 0.875000 + 1.500000 216.000000 29.253180 11 + 0.875000 + 1.500000 216.000000 29.253180 11 + 0.875000 + 1.500000 216.000000 29.225241 11 + 0.875000 + 1.500000 216.000000 29.197300 11 + 0.875000 + 1.500000 216.000000 29.253180 11 + 0.875000 + 1.500000 216.000000 29.309059 11 + 0.875000 + 1.500000 216.000000 29.309059 11 + 0.875000 + 1.500000 216.000000 29.337000 11 + 0.875000 + 1.500000 216.000000 29.337000 11 + 0.875000 + 1.500000 216.000000 29.309059 11 + 0.875000 + 1.500000 216.000000 29.253180 11 + 0.875000 + 1.500000 215.000000 29.197300 11 + 0.875000 + 1.500000 215.000000 29.197300 11 + 0.875000 + 1.500000 215.000000 29.197300 11 + 0.875000 + 1.500000 215.000000 29.197300 11 + 0.875000 + 1.500000 215.000000 29.253180 11 + 0.875000 + 1.500000 215.000000 29.281120 11 + 0.875000 + 1.500000 215.000000 29.253180 11 + 0.875000 + 1.500000 215.000000 29.253180 11 + 0.875000 + 1.500000 215.000000 29.281120 11 + 0.875000 + 1.500000 215.000000 29.281120 11 + 0.875000 + 1.500000 215.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.197300 11 + 0.875000 + 1.500000 214.000000 29.197300 11 + 0.875000 + 1.500000 214.000000 29.197300 11 + 0.875000 + 1.500000 214.000000 29.197300 11 + 0.875000 + 1.500000 214.000000 29.169359 11 + 0.875000 + 1.500000 214.000000 29.197300 11 + 0.875000 + 1.500000 213.000000 29.197300 11 + 0.875000 + 1.500000 213.000000 29.197300 11 + 0.875000 + 1.500000 213.000000 29.197300 11 + 0.875000 + 1.500000 213.000000 29.225241 11 + 0.875000 + 1.500000 213.000000 29.225241 11 + 0.875000 + 1.500000 213.000000 29.225241 11 + 0.875000 + 1.500000 213.000000 29.253180 11 + 0.875000 + 1.500000 213.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.197300 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.309059 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.281120 11 + 0.875000 + 1.500000 214.000000 29.253180 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 214.000000 29.225241 11 + 0.875000 + 1.500000 213.000000 29.253180 11 + 0.875000 + 1.500000 213.000000 29.253180 11 + 0.875000 + 1.500000 213.000000 29.253180 11 + 0.875000 + 1.500000 213.000000 29.281120 11 + 0.875000 + 1.500000 213.000000 29.281120 11 + 0.875000 + 1.500000 213.000000 29.281120 11 + 0.875000 + 1.500000 213.000000 29.281120 11 + 0.875000 + 1.500000 213.000000 29.281120 11 + 0.875000 + 1.500000 213.000000 29.225241 11 + 0.875000 + 1.500000 213.000000 29.225241 11 + 0.875000 + 1.500000 213.000000 29.197300 11 + 0.875000 + 1.500000 212.000000 29.197300 11 + 0.875000 + 1.500000 212.000000 29.197300 11 + 0.875000 + 1.500000 212.000000 29.197300 11 + 0.875000 + 1.500000 212.000000 29.197300 11 + 0.875000 + 1.500000 212.000000 29.225241 11 + 0.875000 + 1.500000 212.000000 29.225241 11 + 0.875000 + 1.500000 212.000000 29.253180 11 + 0.875000 + 1.500000 212.000000 29.281120 11 + 0.875000 + 1.500000 212.000000 29.281120 11 + 0.875000 + 1.500000 212.000000 29.281120 11 + 0.875000 + 1.500000 212.000000 29.281120 11 + 0.875000 + 1.500000 212.000000 29.281120 10 + 1.000000 + 1.625000 212.000000 29.253180 11 + 0.875000 + 1.500000 212.000000 29.253180 10 + 1.125000 + 1.875000 212.000000 29.225241 11 + 0.875000 + 1.500000 212.000000 29.281120 9 + 1.000000 + 1.625000 212.000000 29.281120 11 + 0.875000 + 1.500000 212.000000 29.281120 11 + 0.875000 + 1.500000 212.000000 29.281120 11 + 0.875000 + 1.500000 212.000000 29.281120 11 + 0.875000 + 1.500000 212.000000 29.253180 11 + 0.875000 + 1.500000 212.000000 29.253180 11 + 0.875000 + 1.500000 212.000000 29.253180 11 + 0.875000 + 1.500000 212.000000 29.225241 11 + 1.000000 + 1.625000 212.000000 29.225241 11 + 0.875000 + 1.500000 212.000000 29.225241 11 + 0.875000 + 1.500000 212.000000 29.225241 11 + 0.875000 + 1.500000 212.000000 29.281120 11 + 0.875000 + 1.500000 212.000000 29.281120 11 + 0.875000 + 1.500000 212.000000 29.281120 11 + 0.875000 + 1.500000 212.000000 29.281120 11 + 0.875000 + 1.500000 211.000000 29.281120 11 + 0.875000 + 1.500000 211.000000 29.225241 11 + 0.875000 + 1.500000 211.000000 29.253180 11 + 0.875000 + 1.500000 211.000000 29.225241 11 + 0.875000 + 1.500000 211.000000 29.225241 11 + 0.875000 + 1.500000 211.000000 29.253180 11 + 0.875000 + 1.500000 211.000000 29.253180 11 + 0.875000 + 1.500000 211.000000 29.253180 11 + 0.875000 + 1.500000 211.000000 29.253180 11 + 0.875000 + 1.500000 211.000000 29.225241 11 + 0.875000 + 1.500000 211.000000 29.225241 11 + 0.875000 + 1.500000 211.000000 29.225241 11 + 0.875000 + 1.500000 211.000000 29.225241 11 + 0.875000 + 1.500000 211.000000 29.197300 11 + 0.875000 + 1.500000 210.000000 29.225241 11 + 0.875000 + 1.500000 210.000000 29.225241 11 + 0.875000 + 1.500000 210.000000 29.225241 11 + 0.875000 + 1.500000 210.000000 29.253180 11 + 0.875000 + 1.500000 210.000000 29.281120 11 + 0.875000 + 1.500000 210.000000 29.309059 11 + 0.875000 + 1.500000 210.000000 29.281120 11 + 0.875000 + 1.500000 210.000000 29.253180 11 + 0.875000 + 1.500000 210.000000 29.253180 11 + 0.875000 + 1.500000 210.000000 29.253180 11 + 0.875000 + 1.500000 210.000000 29.253180 11 + 0.875000 + 1.500000 210.000000 29.225241 11 + 0.875000 + 1.500000 210.000000 29.225241 11 + 1.000000 + 1.625000 210.000000 29.253180 11 + 0.875000 + 1.500000 210.000000 29.253180 11 + 1.000000 + 1.625000 210.000000 29.281120 11 + 1.000000 + 1.625000 210.000000 29.253180 10 + 1.000000 + 1.625000 210.000000 29.253180 10 + 1.000000 + 1.625000 210.000000 29.225241 10 + 1.000000 + 1.625000 210.000000 29.225241 10 + 1.000000 + 1.625000 210.000000 29.225241 10 + 1.000000 + 1.625000 210.000000 29.253180 10 + 1.000000 + 1.625000 210.000000 29.253180 10 + 1.000000 + 1.625000 210.000000 29.253180 10 + 1.000000 + 1.625000 210.000000 29.253180 10 + 1.000000 + 1.625000 210.000000 29.253180 10 + 1.000000 + 1.625000 210.000000 29.253180 10 + 1.000000 + 1.625000 209.000000 29.253180 10 + 1.000000 + 1.625000 209.000000 29.253180 10 + 1.000000 + 1.625000 209.000000 29.253180 10 + 1.000000 + 1.625000 209.000000 29.253180 10 + 1.000000 + 1.625000 209.000000 29.225241 10 + 1.000000 + 1.625000 209.000000 29.253180 11 + 0.875000 + 1.500000 209.000000 29.281120 11 + 0.875000 + 1.500000 209.000000 29.253180 11 + 0.875000 + 1.500000 209.000000 29.225241 11 + 0.875000 + 1.500000 209.000000 29.225241 11 + 0.875000 + 1.500000 209.000000 29.225241 11 + 0.875000 + 1.500000 209.000000 29.253180 11 + 0.875000 + 1.500000 209.000000 29.225241 11 + 0.875000 + 1.500000 209.000000 29.225241 11 + 0.875000 + 1.500000 209.000000 29.253180 11 + 0.875000 + 1.500000 209.000000 29.225241 11 + 0.875000 + 1.500000 209.000000 29.225241 11 + 0.875000 + 1.500000 209.000000 29.225241 11 + 0.875000 + 1.500000 209.000000 29.197300 11 + 0.875000 + 1.500000 209.000000 29.197300 11 + 0.875000 + 1.500000 209.000000 29.197300 11 + 0.875000 + 1.500000 209.000000 29.225241 11 + 0.875000 + 1.500000 209.000000 29.253180 11 + 0.875000 + 1.500000 209.000000 29.281120 11 + 0.875000 + 1.500000 209.000000 29.309059 11 + 0.875000 + 1.500000 209.000000 29.309059 11 + 0.875000 + 1.500000 209.000000 29.281120 11 + 0.875000 + 1.500000 209.000000 29.281120 11 + 0.875000 + 1.500000 209.000000 29.253180 11 + 0.875000 + 1.500000 208.000000 29.225241 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 208.000000 29.225241 11 + 0.875000 + 1.500000 208.000000 29.225241 11 + 0.875000 + 1.500000 208.000000 29.197300 11 + 0.875000 + 1.500000 208.000000 29.197300 11 + 0.875000 + 1.500000 208.000000 29.197300 11 + 0.875000 + 1.500000 208.000000 29.197300 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 208.000000 29.281120 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.225241 11 + 0.875000 + 1.500000 207.000000 29.225241 11 + 0.875000 + 1.500000 207.000000 29.225241 11 + 0.875000 + 1.500000 207.000000 29.225241 11 + 0.875000 + 1.500000 207.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.281120 11 + 0.875000 + 1.500000 207.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.281120 11 + 0.875000 + 1.500000 207.000000 29.225241 11 + 0.875000 + 1.500000 207.000000 29.225241 11 + 0.875000 + 1.500000 207.000000 29.253180 9 + 1.125000 + 1.625000 207.000000 29.281120 8 + 1.250000 + 1.500000 207.000000 29.197300 11 + 0.875000 + 1.500000 207.000000 29.141420 11 + 0.875000 + 1.500000 207.000000 29.169359 11 + 0.875000 + 1.500000 207.000000 29.169359 11 + 0.875000 + 1.500000 207.000000 29.225241 11 + 0.875000 + 1.500000 207.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.281120 11 + 0.875000 + 1.500000 207.000000 29.309059 11 + 0.875000 + 1.500000 207.000000 29.309059 11 + 0.875000 + 1.500000 207.000000 29.309059 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 208.000000 29.225241 11 + 0.875000 + 1.500000 208.000000 29.197300 11 + 0.875000 + 1.500000 208.000000 29.197300 11 + 0.875000 + 1.500000 208.000000 29.169359 11 + 0.875000 + 1.500000 208.000000 29.197300 11 + 0.875000 + 1.500000 208.000000 29.225241 11 + 0.875000 + 1.500000 208.000000 29.281120 11 + 0.875000 + 1.500000 208.000000 29.281120 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 208.000000 29.253180 11 + 0.875000 + 1.500000 207.000000 29.225241 11 + 1.125000 + 1.875000 207.000000 29.225241 11 + 1.125000 + 1.875000 207.000000 29.225241 11 + 1.125000 + 1.875000 207.000000 29.197300 11 + 1.125000 + 1.875000 207.000000 29.225241 11 + 1.125000 + 1.875000 207.000000 29.225241 11 + 1.125000 + 1.875000 207.000000 29.225241 11 + 1.125000 + 1.875000 207.000000 29.253180 11 + 1.125000 + 1.875000 207.000000 29.281120 11 + 1.125000 + 1.875000 207.000000 29.253180 11 + 1.125000 + 1.875000 207.000000 29.225241 11 + 1.125000 + 1.875000 207.000000 29.225241 11 + 1.125000 + 1.875000 207.000000 29.197300 11 + 1.125000 + 1.875000 207.000000 29.225241 11 + 1.125000 + 1.875000 207.000000 29.225241 11 + 1.125000 + 1.875000 206.000000 29.253180 11 + 1.125000 + 1.875000 206.000000 29.281120 11 + 1.125000 + 1.875000 206.000000 29.281120 11 + 1.125000 + 1.875000 206.000000 29.225241 11 + 1.125000 + 1.875000 206.000000 29.197300 11 + 1.125000 + 1.875000 206.000000 29.169359 11 + 1.125000 + 1.875000 206.000000 29.197300 11 + 1.125000 + 1.875000 206.000000 29.253180 11 + 1.125000 + 1.875000 206.000000 29.253180 11 + 1.125000 + 1.875000 206.000000 29.253180 11 + 1.125000 + 1.875000 206.000000 29.253180 11 + 1.125000 + 1.875000 206.000000 29.253180 11 + 1.125000 + 1.875000 205.000000 29.253180 11 + 1.125000 + 1.875000 205.000000 29.253180 11 + 1.125000 + 1.875000 205.000000 29.253180 11 + 1.125000 + 1.875000 205.000000 29.225241 11 + 1.125000 + 1.875000 205.000000 29.225241 11 + 1.125000 + 1.875000 205.000000 29.197300 11 + 1.125000 + 1.875000 205.000000 29.225241 11 + 1.125000 + 1.875000 205.000000 29.225241 11 + 1.125000 + 1.875000 205.000000 29.253180 11 + 1.125000 + 1.875000 205.000000 29.253180 11 + 1.125000 + 1.875000 205.000000 29.225241 11 + 1.125000 + 1.875000 205.000000 29.225241 11 + 1.125000 + 1.875000 205.000000 29.197300 11 + 1.125000 + 1.875000 205.000000 29.225241 11 + 1.125000 + 1.875000 205.000000 29.197300 11 + 1.125000 + 1.875000 204.000000 29.225241 11 + 1.125000 + 1.875000 204.000000 29.225241 11 + 1.125000 + 1.875000 204.000000 29.253180 11 + 1.125000 + 1.875000 204.000000 29.253180 11 + 1.125000 + 1.875000 204.000000 29.253180 11 + 1.125000 + 1.875000 204.000000 29.253180 11 + 1.125000 + 1.875000 204.000000 29.225241 11 + 1.125000 + 1.875000 204.000000 29.225241 11 + 1.125000 + 1.875000 204.000000 29.253180 11 + 1.125000 + 1.875000 204.000000 29.225241 11 + 1.125000 + 1.875000 204.000000 29.225241 11 + 1.125000 + 1.875000 204.000000 29.253180 11 + 1.125000 + 1.875000 204.000000 29.253180 11 + 1.125000 + 1.875000 204.000000 29.225241 11 + 1.125000 + 1.875000 204.000000 29.197300 11 + 1.125000 + 1.875000 204.000000 29.197300 11 + 1.125000 + 1.875000 204.000000 29.197300 11 + 1.125000 + 1.875000 204.000000 29.225241 11 + 1.125000 + 1.875000 204.000000 29.225241 11 + 1.125000 + 1.875000 204.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.281120 11 + 1.125000 + 1.875000 203.000000 29.281120 11 + 1.125000 + 1.875000 203.000000 29.281120 11 + 1.125000 + 1.875000 203.000000 29.281120 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.197300 11 + 1.125000 + 1.875000 203.000000 29.197300 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.225241 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.281120 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 203.000000 29.253180 11 + 1.125000 + 1.875000 diff --git a/vpl.c b/vpl.c index a2cbf0ed1..16f32d348 100644 --- a/vpl.c +++ b/vpl.c @@ -30,7 +30,7 @@ sentence. For example: 75700241FA59FB242CD500CF041984991E0B0A0C09060613064509060613064424824D68FF00000800051C000271 -00--1111111122222222333344445555--66----777777777777--------------------------------------CC +00--1111111122222222333344445555--667788999999999999AAAAAAAAAAAA--------------------------XX 0 - Sentence type 1 - Latitude in hex (signed, divide by 0xE1000 for decimal degrees) @@ -45,9 +45,59 @@ 8499 -> 33945 * (360/65535) = 186.47 6 - Number of sats 0B -> 11 -7 - Date and Time (YYMMDDHHMMSS) +7 - HDOP (divide by 8) + 0A -> 10 / 8 = 1.25 +8 - VDOP (divide by 8) + 0C -> 12 / 8 = 1.5 +9 - Date and Time (YYMMDDHHMMSS) 090606130645 = June 6, 2009 13:06:45 -C - Checksum (xor, ala NMEA) +A - Previous line date and time (?) + 090606130644 = June 6, 2009 13:06:44 +X - Checksum (xor, ala NMEA) + +*********************************** +* Unused, but (at least partially) decoded sentences + +****** +0D - Yaw Gyro (This field is not currently decoded herein) + This field is written 25 times per second. It contains the raw values + from the yaw gyro. Positive values for right turns, negative values + for left turns. + +0D00FEFA09 +00??1111CC + +0 - Sentence Type +? - An unknown field with observed values between 0 and 3. +1 - Yaw Gyro value +C - Checksum + +****** +31 - Distance Traveled + This field is written once a second. It contains the number of + meters traveled since the navigation system was last turned on. + +310000117050 +0011111111CC + +0 - Sentence Type +1 - Distance Traveled in Meters +C - Checksum + +****** +35 - Raw Position + This field is written 5 times per second. It contains Latitude + and Longitude, as well as two currently unknown angular values. + +35CFBB5CBC1744CB1BD9023308C2 +00111111112222222233334444CC + +0 - Sentence Type +1 - Longitude (divide by 0x8CA000 for decimal degrees) +2 - Latitude (divide by 0x8CA000 for decimal degrees) +3 - Unknown angular value (multiply by 360/65535) +4 - Unknown angular value (multiply by 360/65535) +C - Checksum */ @@ -100,11 +150,9 @@ vpl_read(void) } while((ibuf = gbfgetstr(vpl_file_in))) { - if(strncmp(ibuf, "75", 2)) { - // Only bother with '75' sentences - continue; - } - vpl_parse_75_sentence(ibuf); + if(strncmp(ibuf, "75", 2) == 0) { + vpl_parse_75_sentence(ibuf); + } } } @@ -125,14 +173,15 @@ vpl_parse_75_sentence(const char *ibuf) gbint32 lat_raw, lon_raw; gbint16 alt, speed_raw; gbuint16 hdg_raw; - gbuint8 sats; + gbuint8 sats, hdop_raw, vdop_raw; waypoint *waypt; struct tm tm; // The files have DOS line endings (CR/LF) but we don't care, because we // don't read to the end. - sscanf(ibuf, "75%*2c%8X%8X%4hX%4hX%4hX%*2c%2hhX%*4c%6u%6u", - &lat_raw, &lon_raw, &alt, &speed_raw, &hdg_raw, &sats, &ymd, &hms); + sscanf(ibuf, "75%*2c%8X%8X%4hX%4hX%4hX%*2c%2hhX%2hhX%2hhX%6u%6u", + &lat_raw, &lon_raw, &alt, &speed_raw, &hdg_raw, &sats, &hdop_raw, &vdop_raw, + &ymd, &hms); tm.tm_sec = hms % 100; hms /= 100; @@ -157,6 +206,8 @@ vpl_parse_75_sentence(const char *ibuf) // Speed comes in (MPH x 0x10) which we have to convert to m/s WAYPT_SET(waypt, speed, (speed_raw / (double) 0x10) * 0.44704); waypt->course = hdg_raw * (double) (360/65535); + waypt->hdop = hdop_raw / (double) 8; + waypt->vdop = vdop_raw / (double) 8; waypt->creation_time = mkgmtime(&tm); diff --git a/xmldoc/formats/vpl.xml b/xmldoc/formats/vpl.xml index aa210c441..b3d8f8ced 100644 --- a/xmldoc/formats/vpl.xml +++ b/xmldoc/formats/vpl.xml @@ -23,7 +23,8 @@ The VPL format contains quite a bit of data, much of which remains undecoded. This format - currently reads only lat/lon, altitude, speed, heading, date/time, and visible sats. + currently reads only lat/lon, altitude, speed, heading, date/time, visible sats, HDOP and + VDOP. Generally, the layout of the format seems similar to NMEA, with discrete sentences @@ -33,7 +34,9 @@ the file is written in ASCII; most of it simply as hexadecimal characters. Most fields are fixed width, though a few can be variable. (Those that are variable have a field count as the first field after their sentence identifier) Currently, - only the '75'-sentence is decoded (and only about 50% of it), though this provides all - the data necessary for position information. (It is likely that it also contains - HDOP/VDOP, but they've not yet been found) + only the '75'-sentence is processed (and only about 70% of it), though this provides all + the data necessary for position information. + + Some fields in other sentences have been decoded, but they are not currently processed. + Information on the data in these fields can be found in vpl.c. -- 2.30.2